﻿<script type="text/javascript" src="${base}/scripts/jggl/jgd_detail.js"></script>
<div id="jgd_tabs" detail="true" class="easyui-tabs" data-options="fit:true,border:false">
    <input type="hidden" id="jgd_id" name="jgd_id_name" value="${(jgd.id)!''}"/>

    <div title="加工单信息">
        <table style="width: 100%" class="tb tab-t t-bor">
            <col width="90px"/>
            <col width=""/>
            <col width="90px"/>
            <col width=""/>
            <tr>
                <th>加工单号：</th>
                <td> ${(jgd.jgdh)!} </td>
                <th>申请公司：</th>
                <td>${(jgd.sqgs.qc)!} </td>
            </tr>
            <tr>
                <th>申报公司：</th>
                <td>${(jgd.sbgs.qc)!}</td>
                <th>申报人：</th>
                <td>${(jgd.sbr.xm)!}</td>
            </tr>

            <tr>
                <th>申报日期：</th>
                <td>${(jgd.sbrq?datetime)!}</td>
                <th>状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态：</th>
                <td><#if jgd.zt??>
                    <#if jgd.zt == 0>
                        已保存
                    </#if>
                    <#if  jgd.zt == 1>已提交</#if>
                    <#if jgd.zt == 2>已完结</#if>
                </#if>
                </td>
            </tr>
            <tr>
                <th>加工日期：</th>
                <td>${(jgd.jgrq?datetime)!}</td>
                <th>制单日期：</th>
                <td>${(jgd.dateCreated?datetime)!}</td>
            </tr>
            <tr>
                <th>加工调出重量：</th>
                <td> ${(jgd.jgzl)!}</td>
                <th>加工调入重量：</th>
                <td>${(jgd.jghzl)!}</td>
            </tr>
            <tr>
                <th>预期成材料率：</th>
                <td><#if jgd.rate??>${(jgd.rate)!}%</#if></td>
                <th>实际成材料率：</th>
                <td><#if jgd.sjrate??>${(jgd.sjrate)!}%</#if></td>
            </tr>
            <tr>
                <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
                <td colspan="3">${(jgd.bz)!}</td>
            </tr>
        </table>
    </div>
    <div title="加工单调出明细">
        <table id="jgd_jgdmx_table" class="easyui-datagrid"
               url="${base}/jggl/jgdgl/jgddetail_wzmx?mxzt=0&jgdId=${(jgd.id)!}" toolbar="#jgdmx_detail_toolbar"
               rownumbers="true" fit="true" fitColumns="true" pagination="true" showFooter="true">
            <thead>
            <tr>
                <th data-options="field:'khbm',width:80,align:'center'">卡号编码</th>
                <th data-options="field:'jtwz.code',width:70,align:'center'">物资编码</th>
                <th data-options="field:'jtwz.name',width:50,align:'center'">物资名称</th>
                <th data-options="field:'jtwz.ggxh',width:70,align:'center'">规格型号</th>
                <th data-options="field:'jtwz.dw',width:20,align:'center'">单位</th>
                <th data-options="field:'cd.z',width:50,align:'center'">产地</th>
                <th data-options="field:'ck.mc',width:50,align:'center'">仓库</th>
                <th data-options="field:'sku',width:50,align:'center'">标识</th>
                <th data-options="field:'sbsl',width:40,align:'right',formatter:formatSlForHtml">申报数量</th>
                <th data-options="field:'sbzl',width:50,align:'right',formatter:formatSlForHtml">申报重量</th>
                <th data-options="field:'jg_sbsl',width:40,align:'right',formatter:formatSlForHtml">加工数量</th>
                <th data-options="field:'jg_sbzl',width:50,align:'right',formatter:formatSlForHtml">加工重量</th>
            </tr>
            </thead>
        </table>
    </div>
    <div title="预期成材明细">
        <table id="jgd_jgdmx_table" class="easyui-datagrid"
               url="${base}/jggl/jgdgl/jgddetail_yqccmx?jgdId=${(jgd.id)!}" toolbar="#jgdmx_detail_toolbar"
               rownumbers="true" fit="true" fitColumns="true" pagination="true" showFooter="true">
            <thead>
            <tr>
                <th data-options="field:'jtwz.code',width:70,align:'center'">物资编码</th>
                <th data-options="field:'jtwz.name',width:50,align:'center'">物资名称</th>
                <th data-options="field:'jtwz.ggxh',width:70,align:'center'">规格型号</th>
                <th data-options="field:'jtwz.cz',width:70,align:'center'">材质</th>
                <th data-options="field:'jtwz.dw',width:20,align:'center'">单位</th>
                <th data-options="field:'cd.z',width:50,align:'center'">产地</th>
                <th data-options="field:'ccsl',width:40,align:'right',formatter:formatSlForHtml">成材数量</th>
                <th data-options="field:'cczl',width:50,align:'right',formatter:formatSlForHtml">成材重量</th>
            </tr>
            </thead>
        </table>
    </div>
    <div title="加工单调入明细">
        <table id="jgd_jgdmx_table" class="easyui-datagrid"
               url="${base}/jggl/jgdgl/jgddetail_wzmx?mxzt=1&jgdId=${(jgd.id)!}" toolbar="#jgdmx_detail_toolbar"
               rownumbers="true" fit="true" fitColumns="true" pagination="true" showFooter="true">
            <thead>
            <tr>
                <th data-options="field:'khbm',width:80,align:'center'">卡号编码</th>
                <th data-options="field:'jtwz.code',width:70,align:'center'">物资编码</th>
                <th data-options="field:'jtwz.name',width:50,align:'center'">物资名称</th>
                <th data-options="field:'jtwz.ggxh',width:70,align:'center'">规格型号</th>
                <th data-options="field:'jtwz.dw',width:20,align:'center'">单位</th>
                <th data-options="field:'cd.z',width:50,align:'center'">产地</th>
                <th data-options="field:'ck.mc',width:50,align:'center'">仓库</th>
                <th data-options="field:'sku',width:50,align:'center'">标识</th>
                <th data-options="field:'jg_sbsl',width:40,align:'right',formatter:formatSlForHtml">加工数量</th>
                <th data-options="field:'jg_sbzl',width:50,align:'right',formatter:formatSlForHtml">加工重量</th>
            </tr>
            </thead>
        </table>
    </div>
</div>